package com.zkthink.ceres.promotion.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

//分销产品库数量

@Getter
public enum SalesProductNumEnum {
    //分销数量
    PRACTICAL_NUM(1, "40"),
    SENIOR_NUM(2, "100"),
    CHIEF_SNUM(3, "100"),
    ;

    private int code;

    private String desc;

    SalesProductNumEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SalesProductNumEnum getDscByType(Integer type) {
        for (SalesProductNumEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
